﻿<?php
	$this->title = 'Historique des déclarations DADS';
	$this->headTitle($this->title);
?>
<table id="afficher_declaration">
	<thead>
		<tr>
			<th>ID</th>
			<th>ID Document</th>
			<th>Date</th>
			<th>Nom</th>
			<th>Télécharger</th>
		</tr>
	</thead>
<?php 
foreach($this->liste_declaration as $declaration) : 
?>
	<tbody>
		<tr>
			<td><?php echo $this->escape($declaration->Id_declaration);?></td>
			<td><?php echo $this->escape($declaration->Id_document);?></td>
			<td><?php echo $this->escape($declaration->Date_ajout);?></td>
			<td><?php echo $this->escape($declaration->Nom_document);?></td>
			<td><?php echo "<a href='".$this->escape($declaration->Lien)."'><img src='".$this->baseUrl()."/images/boutons/mini_pj.png' alt='pj'/></a> ";?></td>
		</tr>
	</tbody>
<?php 
endforeach;
?>

</table>
<br />

<?php
if($droit_user = Zend_Auth::getInstance()->getIdentity())
	{
		$droit_user = Zend_Auth::getInstance()->getIdentity()->Droits;
	}

if($droit_user == 3)
		{
			echo "<a href='".$this->url(array('controller'=>'Document','action'=>'traiter-dads', 'id'=>'null', 'id_ent'=>($this->id_utilisateur)))."'>Traiter le fichier de DADS</a>";
		}
?>

<script type="text/javascript"> 
$(function () {
	tableToGrid("#afficher_declaration", {height: "auto", caption: "DADS par année"});
});
</script>


